package com.leaf.guidesdemos;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.view.View;
import android.widget.TextView;

public class MessengerServiceActivity extends Activity {
	private TextView mCallbackText;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.messenger_service_binding);
		
		mCallbackText = (TextView)findViewById(R.id.callback);
        mCallbackText.setText("Not attached.");
	}
	
	
	public void doBindService(View v){
		bindService(new Intent(this,MessengerService.class), mConnection, BIND_AUTO_CREATE);
		
	}
	
	public void doUnbindService(View v){
		
		
	}
	
	private ServiceConnection mConnection=new ServiceConnection() {
		
		@Override
		public void onServiceDisconnected(ComponentName name) {
			
			
			
		}
		
		@Override
		public void onServiceConnected(ComponentName name, IBinder service) {
			
			
			
		}
	};
	
	
}
